package com.xbongbong.pro.weblist.pojo;

import com.xbongbong.saas.enums.business.WorkReportTypeEnum;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author haibin.zhang
 * @version v1.0
 * @date 2019/2/25 19:03
 * @since v1.0
 */
@Getter
@Setter
public class WorkReportVisibleRangePojo {
    private boolean dayEnable;
    private boolean weekEnable;
    private boolean monthEnable;

    public List<String> getTypeList(){
        List<String> list = new ArrayList<>();
        if (dayEnable){
            list.add(WorkReportTypeEnum.DAILY.getType().toString());
        }
        if (weekEnable){
            list.add(WorkReportTypeEnum.WEEKLY.getType().toString());
        }
        if (monthEnable){
            list.add(WorkReportTypeEnum.MONTHLY.getType().toString());
        }
        if (list.isEmpty()){
            list.add("-1");
        }
        return list;
    }
}
